package com.xx.springboot.designPattern.DecoratorMode;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilterInputStream;
import java.io.InputStream;

/**
 * <p>
 *  TODO: 装饰者模式测试
 * </p>
 *
 * @author hcg
 * @date 2018-11-14 10:39
 * @className test
 */
public class test {
    
    /**
     * <p>
     * \tTODO:
     * </p>
     * @Author hcg
     * @Date 2018-11-14 11:29 
     * @Param 
     * @return 
     **/
    public static void main(String[] args) throws Exception {
        StringBuffer sb = new StringBuffer();
        int c;
        InputStream in = new FileInputStream("E:\\test.txt");
        while ((c = in.read()) > 0 ) {
            sb.append((char)c);
        }
        System.out.println(sb.toString());

        Beverage beverage = new Mocha(new HouseBlend());

        System.out.println(beverage.getDescription());
        System.out.println(beverage.cost());
    }
}
